import { Schema, model } from 'mongoose';

const UserSchema = new Schema({
    username: { type: String, require: true, unique: true },
    password: { type: String, require: true },
    avatar: { type: String },
    balance: { type: String, default: '0' },
    'signup_time': { type: Number, require: true },
    'signin_time': { type: Number, default: 0 },
    freeze: { type: Boolean, default: false },
    'unfreeze_time': { type: Number, default: 0 },
});

export default model('User', UserSchema);